//订单详情页面
///team/GetOrderInfo
///team/GetGemOrderInfo
///team/GetRingOrderInfo
///team/GetParcelOrderInfo
///team/GetEmeraldOrderInfo
//参数：{"OrderID":123}

(function(){
	var orderDetail={
		init:function(){
			args = GetUrlParms();				
			if(args["ID"]!=undefined){						
				 orderID = args["ID"];//产品ID					 
			}
			if(args["type"]!=undefined){
				TYPE=args["type"];
			}
			this.bindEvents();
			this.getOrderDetail();
		},
		bindEvents:function(){
			var self=this;
			
		},
		getOrderDetail:function(){
			myApp.showIndicator();
			var submitJson={};
			submitJson.OrderID=orderID;
			if(TYPE==2){//统包

				submitJson.GoodsType=2;
			}else if(TYPE==3){//成品
				submitJson.GoodsType=3;
			}else if(TYPE==4){//彩宝
                submitJson.GoodsType=4;
			}else if(TYPE==5){//翡翠
                submitJson.GoodsType=5;
			}else if(TYPE==6){//素金
                submitJson.GoodsType=6;
			}else if(TYPE==7){ //空托
                submitJson.GoodsType=7;
			}
			$.ajax({
				url:"/team/GetOrderNew",
				type:"POST",
				data:JSON.stringify(submitJson),
				contentType:"application/json; charset=utf8",
				timeout: 30000, //超时时间：30秒
				success:function(result){
					var res=eval('('+result+')');
					console.log(res);
					if(res.msgcode==true){
						var data=res.msginfo;
						var data_parse = JSON.parse(data.InventoryAttribute);
						var cilentWidth=document.documentElement.clientWidth; 
						imgs = data_parse.Images.split("|");
						var $img="";
						var imgArray=[];
						 for (var i=0; i< imgs.length;i++) {
				            if (imgs[i].length > 10) {
				            	$img+='<div class="swiper-slide"><img src="'+imgs[i]+'" width='+cilentWidth+' height='+cilentWidth+' alt=""></div>';
				            	imgArray.push(imgs[i]);			            	
				            }else{
				            	$img+='<div class="swiper-slide"><img src="../../Images/no_img.jpg" width='+cilentWidth+' height='+cilentWidth+' alt=""></div>';
				            }
				       	}
						if(TYPE==2){//统包
							//订单详情权限start
                            var categoryOrderPower=''; //类型
                                categoryOrderPower='<div class="col-50"><label>'+_("类型")+'：</label><b>'+GetCategory("parcels",data_parse.Category)+'</b></div>'

							var shapeOrderPower=''; //形状
                                shapeOrderPower='<div class="col-50"><label>'+_("形状")+'：</label><b>'+GetText("parcels",data_parse.Category,data_parse.Shape,"Shape")+'</b></div>'
							var colorOrderPower=''; //颜色
                                colorOrderPower='<div class="col-50"><label>'+_("颜色")+'：</label><b>'+GetText("parcels",data_parse.Category,data_parse.Color,"Color")+'</b></div>'

							var clarityOrderPower=''; //净度
                                clarityOrderPower='<div class="col-50"><label>'+_("净度")+'：</label><b>'+GetText("parcels",data_parse.Category,data_parse.Clarity,"Clarity")+'</b></div>'

							var priceRmbOrderPower=''; //人民币/Ct
							if(RMBPrice_td_new==true){
                                priceRmbOrderPower='<div class="col-50 CurrentRMB"><label>￥/Ct：</label><b>'+formatRMBPrice(data.ConfirmRMB)+'</b></div>'
							}

							var priceOrderPower=''; //美元/Ct
							if(price_td_new==true){
                                priceOrderPower='<div class="col-50 CurrentUSD"><label>$/Ct：</label><b>'+formatUSDPrice(data.ConfirmUSD)+'</b></div>'
							}

                            var priceRmbOrderPowerAll=''; //人民币
                            if(RMBPrice_td_new==true){
                                priceRmbOrderPowerAll='<div class="col-50 CurrentRMB"><label>卖￥：</label><b>'+formatRMBPrice((data.ConfirmRMB)*(data.InventoryCount))+'</b></div>'
                            }

                            var priceOrderPowerAll=''; //美元
                            if(price_td_new==true){
                                priceOrderPowerAll='<div class="col-50 CurrentUSD"><label>卖$：</label><b>'+formatUSDPrice((data.ConfirmUSD)*(data.InventoryCount))+'</b></div>'
                            }

                            var placeOrderPower=''; //所在地
							if(place_td_new==true){
                                placeOrderPower='<div class="col-50"><label>'+_("所在地")+'：</label><b>'+GetText("parcels",data_parse.Category,data_parse.Place,"Place")+'</b></div>'
							}
                            //订单详情权限end

							var $div=[
								'<div class="row">',
//
							        '<div class="col-100"><label>'+_("状态")+'：</label><b>',getOrderStatus(data.OrderStatus),'</b></div>',
						     	'</div>',
								'<div class="row">',
							        '<div class="col-50"><label>'+_("货号")+'：</label><b>',data_parse.OriginSN,'</b></div>',
                                	categoryOrderPower,
						     	'</div>',
						     	'<div class="row">',
                                	shapeOrderPower,
							        '<div class="col-50"><label>'+_("大小")+'：</label><b>',data_parse.Size,'</b></div>',
						     	'</div>',
						     	'<div class="row">',
                                colorOrderPower,clarityOrderPower,
						     	'</div>',
						     	'<div class="row">',
							        '<div class="col-50"><label>'+_("购买重量")+'：</label><b>',data.InventoryCount,'</b></div>',
							        '<div class="col-50 exchangeRate"><label>'+_("汇率")+'：</label><b>',(data.SalesExchangerate),'</b></div>',
						     	'</div>',
						     	'<div class="row price_box">',
                                	priceRmbOrderPower,priceOrderPower,
						     	'</div>',
								 '<div class="row price_box">',
                                	priceRmbOrderPowerAll,priceOrderPowerAll,
						     	'</div>',
						     	'<div class="row">',
							        '<div class="col-50"><label>'+_("支付")+'：</label><b>',data.ReceiptStatus?_("已收"):_("未收"),'</b></div>',
                                	placeOrderPower,
						     	'</div>',
						     	'<div class="row">',
							        '<div class="col-100"><label>'+_("昵称")+'：</label><b>',data.NickName,'</b></div>',
						     	'</div>',
						     	
						     	'<div class="row">',
						     		'<div class="col-100"><label>'+_("客户备注")+'：</label><b>',data.Remarks,'</b></div>',
						     	'</div>',
						     	'<div class="row">',
						     		'<div class="col-100"><label>'+_("业务备注")+'：</label><b>',data.SalesRemarks,'</b></div>',
						     	'</div>',
						     	'<div class="row">',
						     		'<div class="col-100"><label>'+_("下单时间")+'：</label><b>',DateTimeFormat(data.CreateTime),'</b></div>',
						     	'</div>',
							].join('');
						}else if(TYPE==3){//成品
							//订单详情权限start
                            var seriesDetailOrderPower=''; //系列
                                seriesDetailOrderPower= '<div class="row">'+
                                    '<div class="col-100"><label>'+_("系列")+'：</label><b>'+data_parse.Series+'</b></div>'+
                                    '</div>'
							var weightDetailOrderPower=''; //总重
                                weightDetailOrderPower= '<div class="col-50"><label>'+_("总重")+'：</label><b>'+data_parse.Weight+'</b></div>';

							var mainWeightDetailOrderPower=''; //主石重量
                            	mainWeightDetailOrderPower='<div class="col-50"><label>'+_("主石重量")+'：</label><b>'+data_parse.MainWeight+'</b></div>';
							var materialDetailOrderPower='';//材质
                                materialDetailOrderPower='<div class="col-50"><label>'+_("材质")+'：</label><b>'+GetText("inlays",data_parse.Category,data_parse.Material,"Material")+'</b></div>';
							var priceDetailOrderPower=''; //人民币和美元
							if(priceRing_td_new==true){
                            	priceDetailOrderPower='<div class="col-50 CurrentUSD"><label>$/Pkg：</label><b>'+formatUSDPrice(data.ConfirmUSD)+'</b></div>';
							}
							if(RMBRingPrice_td_new==true){
                            	priceDetailOrderPower+='<div class="col-50 CurrentRMB"><label>￥/Pkg：</label><b>'+formatRMBPrice(data.ConfirmRMB)+'</b></div>';
							}
							var placeDetailOrderPower=''; //所在地
							if(placeRing_td_new==true){
                            	placeDetailOrderPower= '<div class="col-50"><label>'+_("所在地")+'：</label><b>'+GetText("inlays",data_parse.Category,data_parse.Place,"Place")+'</b></div>'
							}

                            //订单详情权限end

							var $div=[
								'<div class="row">',
							        '<div class="col-100"><label>'+_("状态")+'：</label><b>',getOrderStatus(data.OrderStatus),'</b></div>',
						     	'</div>',
                                seriesDetailOrderPower,
								'<div class="row">',
							        '<div class="col-50"><label>'+_("货号")+'：</label><b>',data_parse.OriginSN,'</b></div>',
							        '<div class="col-50"><label>'+_("类型")+'：</label><b>',GetCategory("inlays",data_parse.Category),'</b></div>',
						     	'</div>',
						     	'<div class="row">',
							        '<div class="col-50"><label>'+_("现货")+'：</label><b>',GetText("inlays",data_parse.Category,data_parse.IsStock,"IsStock"),'</b></div>',
							        '<div class="col-50"><label>'+_("风格")+'：</label><b>',GetText("inlays",data_parse.Category,data_parse.Style,"Style"),'</b></div>',
						     	'</div>',
						     	'<div class="row">',
							        '<div class="col-50"><label>'+_("主石")+'：</label><b>',GetText("inlays",data_parse.Category,data_parse.Type,"Type"),'</b></div>',
									weightDetailOrderPower,
						     	'</div>',
						     	'<div class="row">',
                                	mainWeightDetailOrderPower,
							        '<div class="col-50"><label>'+_("副石重量")+'：</label><b>',data_parse.SideWeight,'</b></div>',
						     	'</div>',
						     	'<div class="row">',
							        '<div class="col-50"><label>'+_("主石颜色")+'：</label><b>',GetText("inlays",data_parse.Category,data_parse.MainColor,"MainColor"),'</b></div>',
							        '<div class="col-50"><label>'+_("主石净度")+'：</label><b>',GetText("inlays",data_parse.Category,data_parse.MainClarity,"MainClarity"),'</b></div>',							        
						     	'</div>',
						     	'<div class="row">',
									materialDetailOrderPower,
							        '<div class="col-50 exchangeRate"><label>'+_("汇率")+'：</label><b>',(data.SalesExchangerate),'</b></div>',
						     	'</div>',
						     	'<div class="row price_box">',
									priceDetailOrderPower,
						     	'</div>',
						     	'<div class="row">',
							        '<div class="col-50"><label>'+_("成品证书")+'：</label><b>',data_parse.CertType,'</b></div>',
							        '<div class="col-50"><label>'+_("主石证书")+'：</label><b>',data_parse.MainCertType,'</b></div>',
						     	'</div>',
						     	'<div class="row">',
							        '<div class="col-50"><label>'+_("证书号")+'：</label><b>',data_parse.MainCertNo,'</b></div>',
							        '<div class="col-50"><label>'+_("尺寸")+'：</label><b>',data_parse.Measurement,'</b></div>',
						     	'</div>',
						     	'<div class="row">',
							        '<div class="col-50"><label>'+_("支付")+'：</label><b>',data.ReceiptStatus?_("已收"):_("未收"),'</b></div>',
								    placeDetailOrderPower,
						     	'</div>',
						     	'<div class="row">',
							        '<div class="col-100"><label>'+_("昵称")+'：</label><b>',data.NickName,'</b></div>',
//							        '<div class="col-50"><label>状态：</label><b>',getOrderStatus(data.OrderStatus),'</b></div>',
						     	'</div>',
						     	
						     	'<div class="row">',
						     		'<div class="col-100"><label>'+_("客户备注")+'：</label><b>',data.Remarks,'</b></div>',
						     	'</div>',
						     	'<div class="row">',
						     		'<div class="col-100"><label>'+_("业务备注")+'：</label><b>',data.SalesRemarks,'</b></div>',
						     	'</div>',
						     	'<div class="row">',
						     		'<div class="col-100"><label>'+_("下单时间")+'：</label><b>',DateTimeFormat(data.CreateTime),'</b></div>',
						     	'</div>',
							].join('');
						}else if(TYPE==4){//彩宝
							var $div=[
								'<div class="row">',
//							        '<div class="col-100"><label>昵称：</label><b>',data.NickName,'</b></div>',
							        '<div class="col-100"><label>'+_("状态")+'：</label><b>',getOrderStatus(data.OrderStatus),'</b></div>',
						     	'</div>',
								'<div class="row">',
							        '<div class="col-50"><label>'+_("货号")+'：</label><b>',data.OriginSN,'</b></div>',
							        '<div class="col-50"><label>'+_("类型")+'：</label><b>',GetCategory("gems",data.Category),'</b></div>',
						     	'</div>',
						     	'<div class="row">',
							        '<div class="col-50"><label>'+_("形状")+'：</label><b>',GetText("gems",data.Category,data.Shape,"Shape"),'</b></div>',
							        '<div class="col-50"><label>'+_("颜色")+'：</label><b>',GetText("gems",data.Category,data.Color,"Color"),'</b></div>',
						     	'</div>',
						     	'<div class="row">',
							        '<div class="col-50"><label>'+_("证书")+'：</label><b>',data.CertType,'</b></div>',
							        '<div class="col-50"><label>'+_("证书号")+'：</label><b>',data.CertNo,'</b></div>',
						     	'</div>',
						     	'<div class="row">',
							        '<div class="col-50"><label>'+_("处理")+'：</label><b>',GetText("gems",data.Category,data.Process,"Process"),'</b></div>',
							        '<div class="col-50"><label>'+_("切工")+'：</label><b>',GetText("gems",data.Category,data.Cut,"Cut"),'</b></div>',
						     	'</div>',
						     	'<div class="row">',
							        '<div class="col-50"><label>'+_("切工方式")+'：</label><b>',GetText("gems",data.Category,data.CutMethod,"CutMethod"),'</b></div>',
							        '<div class="col-50"><label>'+_("油性")+'：</label><b>',GetText("gems",data.Category,data.Oiliness,"Oiliness"),'</b></div>',							        
						     	'</div>',
						     	'<div class="row">',
							        '<div class="col-50"><label>'+_("总重")+'：</label><b>',data.Weight,'</b></div>',
							        '<div class="col-50"><label>'+_("尺寸")+'：</label><b>',data.Measurement,'</b></div>',
						     	'</div>',
						     	'<div class="row">',
							        '<div class="col-50"><label>'+_("产地")+'：</label><b>',GetText("gems",data.Category,data.Place,"Place"),'</b></div>',
							        '<div class="col-50 exchangeRate"><label>'+_("汇率")+'：</label><b>',(data.SalesExchangerate),'</b></div>',
						     	'</div>',
						     	'<div class="row price_box ">',
						     		'<div class="col-50 CurrentRMB"><label>￥/Ct：</label><b>',formatRMBPrice((data.ConfirmPrice/data.Weight)),'</b></div>',
							        '<div class="col-50 CurrentUSD"><label>$/Ct：</label><b>',formatUSDPrice((data.ConfirmPrice/data.Weight)/data.SalesExchangerate),'</b></div>',
						     	'</div>',
						     	'<div class="row price_box">',
							        '<div class="col-50 CurrentRMB"><label>￥/Pkg：</label><b>',formatRMBPrice(data.ConfirmPrice),'</b></div>',
							        '<div class="col-50 CurrentUSD"><label>$/Pkg：</label><b>',formatUSDPrice(data.ConfirmPrice/data.SalesExchangerate),'</b></div>',
						     	'</div>',
						     	'<div class="row">',
							        '<div class="col-50"><label>'+_("支付")+'：</label><b>',data.PaymentStatus?_("已支付"):_("未支付"),'</b></div>',
							        '<div class="col-50"><label>'+_("所在地")+'：</label><b>',GetText("gems",data.Category,data.Place,"Place"),'</b></div>',
						     	'</div>',
						     	'<div class="row">',
							        '<div class="col-100"><label>'+_("昵称")+'：</label><b>',data.NickName,'</b></div>',
//							        '<div class="col-50"><label>状态：</label><b>',getOrderStatus(data.OrderStatus),'</b></div>',
						     	'</div>',
						     	
						     	'<div class="row">',
						     		'<div class="col-100"><label>'+_("备注")+'：</label><b>',data.Comments,'</b></div>',
						     	'<div>',
						     	'<div class="row">',
						     		'<div class="col-100"><label>'+_("客户备注")+'：</label><b>',data.Remarks,'</b></div>',
						     	'</div>',
						     	'<div class="row">',
						     		'<div class="col-100"><label>'+_("业务备注")+'：</label><b>',data.SalesRemarks,'</b></div>',
						     	'</div>',
						     	'<div class="row">',
						     		'<div class="col-100"><label>'+_("下单时间")+'：</label><b>',DateTimeFormat(data.AddTime),'</b></div>',
						     	'</div>',
							].join('');
						}else if(TYPE==5){//翡翠emeralds
							var $div=[
								'<div class="row">',
//							        '<div class="col-100"><label>昵称：</label><b>',data.NickName,'</b></div>',
							        '<div class="col-100"><label>'+_("状态")+'：</label><b>',getOrderStatus(data.OrderStatus),'</b></div>',
						     	'</div>',
								'<div class="row">',
							        '<div class="col-50"><label>'+_("货号")+'：</label><b>',data.OriginSN,'</b></div>',
							        '<div class="col-50"><label>'+_("类型")+'：</label><b>',GetCategory("emeralds",data.Category),'</b></div>',
						     	'</div>',
						     	'<div class="row">',
							        '<div class="col-50"><label>'+_("名称")+'：</label><b>',data.Name,'</b></div>',
							        '<div class="col-50"><label>'+_("类别")+'：</label><b>',GetText("emeralds",data.Category,data.Type,"Type"),'</b></div>',
						     	'</div>',
						     	'<div class="row">',
							        '<div class="col-50"><label>'+_("类别细分")+'：</label><b>',getEmeraldType(data.Type2),'</b></div>',
							        '<div class="col-50"><label>'+_("种地")+'：</label><b>',GetText("emeralds",data.Category,data.Texture,"Texture"),'</b></div>',
							       
						     	'</div>',
						     	'<div class="row">',
						     	 	'<div class="col-50"><label>'+_("证书")+'：</label><b>',data.CertType,'</b></div>',
							        '<div class="col-50"><label>'+_("证书号")+'：</label><b>',data.CertNo,'</b></div>',
						     	'</div>',
						     	'<div class="row">',
							        '<div class="col-50"><label>'+_("颜色")+'：</label><b>',data.Color,'</b></div>',
							        '<div class="col-50"><label>'+_("尺寸")+'：</label><b>',data.Measurement,'</b></div>',							        
						     	'</div>',
						     	'<div class="row">',
							        '<div class="col-50"><label>'+_("所在地")+'：</label><b>',data.Country,data.State,'</b></div>',
//							        '<div class="col-50"><label>价格：</label><b>',data.ConfirmPrice,'</b></div>',
						     	'</div>',
						     	'<div class="row price_box">',
							        '<div class="col-50 CurrentUSD"><label>$/Pkg：</label><b>',formatUSDPrice(data.ConfirmPrice/data.SalesExchangerate),'</b></div>',
							        '<div class="col-50 CurrentRMB"><label>￥/Pkg：</label><b>',formatRMBPrice(data.ConfirmPrice),'</b></div>',
						     	'</div>',
						     	'<div class="row">',
							        '<div class="col-50"><label>'+_("支付")+'：</label><b>',data.PaymentStatus?_("已支付"):_("未支付"),'</b></div>',
							        '<div class="col-50"><label>'+_("所在地")+'：</label><b>',GetText("emeralds",data.Category,data.Place,"Place"),'</b></div>',
						     	'</div>',
						     	'<div class="row">',
							        '<div class="col-100"><label>'+_("昵称")+'：</label><b>',data.NickName,'</b></div>',
//							        '<div class="col-50"><label>状态：</label><b>',getOrderStatus(data.OrderStatus),'</b></div>',
						     	'</div>',
						     	
						     	'<div class="row">',
						     		'<div class="col-100"><label>'+_("描述")+'：</label><b>',data.Comments,'</b></div>',
						     	'</div>',
						     	'<div class="row">',
						     		'<div class="col-100"><label>'+_("客户备注")+'：</label><b>',data.Remarks,'</b></div>',
						     	'</div>',
						     	'<div class="row">',
						     		'<div class="col-100"><label>'+_("业务备注")+'：</label><b>',data.SalesRemarks,'</b></div>',
						     	'</div>',
						     	'<div class="row">',
						     		'<div class="col-100"><label>'+_("下单时间")+'：</label><b>',DateTimeFormat(data.AddTime),'</b></div>',
						     	'</div>',
							].join('');
						}else if(TYPE==6){//素金prime_golds
							var $div=[
								'<div class="row">',
//							        '<div class="col-100"><label>昵称：</label><b>',data.NickName,'</b></div>',
							        '<div class="col-100"><label>'+_("状态")+'：</label><b>',getOrderStatus(data.OrderStatus),'</b></div>',
						     	'</div>',
								'<div class="row">',
							        '<div class="col-50"><label>'+_("货号")+'：</label><b>',data.OriginSN,'</b></div>',
							        '<div class="col-50"><label>'+_("类型")+'：</label><b>'+_("素金")+'</b></div>',
						     	'</div>',
						     	'<div class="row">',
							        '<div class="col-50"><label>'+_("品类")+'：</label><b>',GetText("prime_golds",1,data.Type,"Type"),'</b></div>',
							        '<div class="col-50"><label>'+_("工艺造型")+'：</label><b>',GetText("prime_golds",1,data.Style,"Style"),'</b></div>',
						     	'</div>',
						     	'<div class="row">',
							        '<div class="col-50"><label>'+_("系列名称")+'：</label><b>',data.Series,'</b></div>',
							        '<div class="col-50"><label>'+_("约重")+'(g)：</label><b>',GetText("prime_golds",1,data.Weight,"Weight"),'</b></div>',
							       
						     	'</div>',
						     	'<div class="row">',
						     	 	'<div class="col-50"><label>'+_("总重")+'：</label><b>',data.TotalWeight,'</b></div>',
							        '<div class="col-50"><label>'+_("数量")+'：</label><b>',data.StockNumber,'</b></div>',
						     	'</div>',
						     	'<div class="row">',
							        '<div class="col-50"><label>'+_("材质")+'：</label><b>',GetText("prime_golds",1,data.Material,"Material"),'</b></div>',
							        '<div class="col-50"><label>'+_("所在地")+'：</label><b>',data.Country,data.State,'</b></div>',							        						        
						     	'</div>',
						     	'<div class="row">',
							        '<div class="col-50"><label>'+_("成品证书")+'：</label><b>',data.CertType,'</b></div>',
							        '<div class="col-50"><label>'+_("是否现货")+'：</label><b>',GetText("prime_golds",1,data.IsStock,"IsStock"),'</b></div>',							        						        
						     	'</div>',
						     	'<div class="row">',
							        '<div class="col-50"><label>'+_("单价工费")+'￥：</label><b>',formatRMBPrice(data.LaborFee),'</b></div>',	
							        '<div class="col-50"><label>'+_("金价")+'￥：</label><b>',formatRMBPrice(data.GoldPrice),'</b></div>',
						     	'</div>',
						     	'<div class="row">',
							        '<div class="col-50"><label>'+_("支付")+'：</label><b>',data.PaymentStatus?_("已支付"):_("未支付"),'</b></div>',
//							        '<div class="col-50"><label>所在地：</label><b>',GetText("gems",data.Category,data.Place,"Place"),'</b></div>',
						     	'</div>',
						     	'<div class="row">',
							        '<div class="col-100"><label>'+_("昵称")+'：</label><b>',data.NickName,'</b></div>',
//							        '<div class="col-50"><label>状态：</label><b>',getOrderStatus(data.OrderStatus),'</b></div>',
						     	'</div>',
						     	
						     	'<div class="row">',
						     		'<div class="col-100"><label>'+_("描述")+'：</label><b>',data.Remark,'</b></div>',
						     	'</div>',
						     	'<div class="row">',
						     		'<div class="col-100"><label>'+_("详情")+'：</label><b>',data.Details,'</b></div>',
						     	'</div>',
						     	'<div class="row">',
						     		'<div class="col-100"><label>'+_("客户备注")+'：</label><b>',data.Remarks,'</b></div>',
						     	'</div>',
						     	'<div class="row">',
						     		'<div class="col-100"><label>'+_("业务备注")+'：</label><b>',data.SalesRemarks,'</b></div>',
						     	'</div>',
						     	'<div class="row">',
						     		'<div class="col-100"><label>'+_("下单时间")+'：</label><b>',DateTimeFormat(data.AddTime),'</b></div>',
						     	'</div>',
							].join('');
						}else if(TYPE==7){
							//权限start
                            var inlayPrice="";
							if(RMBInlaySettingsPrice_td_new == true){
                            	inlayPrice='<div class="col-50"><label>'+_("￥/件")+'：</label><b>'+formatRMBPrice(data_parse.Price)+'</b></div>'
							}
                            var inlayCountry="";
							if(placeInlaySettings_td_new == true){
                                inlayCountry='<div class="col-50"><label>'+_("所在地")+'：</label><b>'+GetText("inlaysettings",1,data_parse.Country,"Country")+data_parse.State+'</b></div>'
							}

                            var $div=[
                                '<div class="row">',
                                '<div class="col-100"><label>'+_("状态")+'：</label><b>',getOrderStatus(data.OrderStatus),'</b></div>',
                                '</div>',
                                '<div class="row">',
                                '<div class="col-50"><label>'+_("货号")+'：</label><b>',data_parse.OriginSN,'</b></div>',
                                '<div class="col-50"><label>'+_("现货")+'：</label><b>',GetText("inlaysettings",1,data_parse.IsStock,"IsStock2"),'</b></div>',
                                '</div>',
                                '<div class="row">',
                                '<div class="col-50"><label>'+_("风格")+'：</label><b>',GetText("inlaysettings",1,data_parse.Style,"Style"),'</b></div>',
                                '<div class="col-50"><label>'+_("主石类型")+'：</label><b>',GetText("inlaysettings",1,data_parse.Type,"Type"),'</b></div>',
                                '</div>',
                                '<div class="row">',
                                '<div class="col-50"><label>'+_("主石工艺")+'：</label><b>',GetText("inlaysettings",1,data_parse.Technics,"Technics"),'</b></div>',
                                '<div class="col-50"><label>'+_("形状")+'：</label><b>',GetText("inlaysettings",1,data_parse.MainShape,"MainShape"),'</b></div>',
                                '</div>',
                                '<div class="row">',
                                '<div class="col-50"><label>'+_("主石重")+'：</label><b>',data_parse.MainWeight,'</b></div>',
                                '<div class="col-50"><label>'+_("副石重")+'：</label><b>',,data_parse.SideWeight,'</b></div>',
                                '</div>',
                                '<div class="row">',
                                '<div class="col-50"><label>'+_("总重")+'：</label><b>',data_parse.TotalWeight,'</b></div>',
                                '<div class="col-50"><label>'+_("材质")+'：</label><b>',GetText("inlaysettings",1,data_parse.Material,"Material"),'</b></div>',
                                '</div>',
                                '<div class="row">',
                                '<div class="col-50"><label>'+_("尺寸")+'：</label><b>',data_parse.Measurement,'</b></div>',
									inlayPrice,
                                '</div>',
                                '<div class="row">',
								inlayCountry,
                                '<div class="col-50"><label>'+_("客户")+'：</label><b>',data.CustomerNickName,'</b></div>',
                                '</div>',
                                '<div class="row">',
                                '<div class="col-50"><label>'+_("下单")+'：</label><b>',DateTimeFormat(data.CreateTime),'</b></div>',
                                '<div class="col-50"><label>状态：</label><b>',getOrderStatus(data.OrderStatus),'</b></div>',
                                '</div>',
                                '<div class="row">',
							        '<div class="col-100"><label>支付：</label><b>',PaymentStatusFormat(data.ReceiptStatus),'</b></div>',
                                '</div>',

                                '<div class="row">',
                                '<div class="col-100"><label>'+_("客户备注")+'：</label><b>',data.Remarks,'</b></div>',
                                '<div>',
                                '</div>',
                            ].join('');
						}
						$("#orderDetail").html($div);
						$("#product_img_box").html($img);//图片
					}else{
						myApp.alert(res.msginfo);
					}
					myApp.hideIndicator();
					currentShow();  //币种设置
				},
	            error: function(XMLHttpRequest, textStatus, errorThrown){
					myApp.hideIndicator();//隐藏加载中
					myApp.alert("网络超时，请重试");
				},
			});
		},
	}
	orderDetail.init();
})();

//订单状态
function getOrderStatus(val){
	var valtext="";
	if(val==1){
		valtext="下单成功";
	}else if(val==2){
		valtext="订购成功";
	}else if(val==3){
		valtext="到货成功";
	}else if(val==4){
		valtext="交货成功";
	}else if(val==5){
		valtext="作废成功";
	}else if(val==6){
		valtext="退货成功";
	}
	return _(valtext);
}
